#include <cstdio>
#include <cstring>

char s[ 10010 ];
int n, a[ 10010 ], w[ 10010 ];

int wei( int x )
{
    int t = 1;
    while ( x >= 10 )
    {
        t++;
        x /= 10;
    }
    return t;
}

void init( )
{
    int i, t;
    n = 0;
    if ( s[ 0 ] == 'L' )
        a[ n++ ] = 0;
    a[ n ] = 1;
    for ( i = 1; i < strlen( s ); i++ )
        if ( s[ i ] != s[ i - 1 ] )
            a[ ++n ] = 1;
        else
            a[ n ]++;
    a[ n ]++;
    for ( i = 0; i <= n; i++ )
        w[ i ] = wei( a[ i ] );
}

void work( )
{
    int i, j, hblank = 3 * n - 1, qblank = 0;
    for ( i = 0; i <= n; i++ ) hblank += w[ i ];
    for ( i = 0; i < n; i++ )
    {
        for ( j = 0; j < hblank; j++ ) printf(" ");
        puts("1");
        for ( j = 0; j < qblank; j++ ) printf(" ");
        printf("%d + ", a[ i ]);
        qblank += w[ i ] + 3;
        for ( j = 0; j < hblank - qblank + 1; j++ ) printf("-");
        puts("");
    }
    for ( i = 0; i < qblank; i++ ) printf(" ");
    printf("%d\n", a[ n ]);
}

int main( )
{
    while ( scanf("%s", s) != EOF )
    {
        init( );
        work( );
    }
    return 0;
}
